home *** CD-ROM | disk | FTP | other *** search
/ Software USA 4 #8 / Software USA Volume 4.08.iso / mac / LifeStyles / ComicBase / ComicBase.sea / ComicBase 3 Mac Demo / ComicBase 3 Demo.rsrc / LENS_132_Select Issues < prev    next >
Text File  |  1998-02-04  |  7KB  |  107 lines

  1. ItemType: WIND
  2. Rect: 256,234,768,534
  3. Style: Dialog
  4. HasTitleBar: TRUE
  5. HasZoomBox: FALSE
  6. Name: Select Issues
  7. WhiteColor: -8739,-8739,-8739
  8. Script: --on windowEvent  wdID,wdName,objNo,objName,objValue¬Global IssueSelection, selectedTitles¬¬global gWindowPositions, gIssuesListWindowID, serialNum¬global selectedTitleNums, gIssuesWindowName, gIssueSelection¬global cMaxFieldChars, gIssuesListStartIndex, gIssuesListPage, gMultiIssuesListSelections¬global gCompositeListing¬¬---------------------¬-- This is window #21¬---------------------¬¬if objValue="Open" then ¬  -- Restore old window position¬  put OldWindowPosition(21) into windowRect¬  if windowRect = empty then centerWindow wdName¬  else wsSet wdID,"0","Rect",windowRect¬  ¬  enable menuItem "Select All" of menu "Edit"¬  ¬  -- Set up the multilistSelections¬  put 1 into gIssueSelection¬  put empty into gMultiIssuesListSelections¬  put 0 into gIssuesListStartIndex¬  set the itemDelimiter to comma¬  put the last item of gIssueSelection into endSelect¬  put false into done¬  put 1 into x¬  repeat until done¬    add 1 to x¬    set cursor to busy¬    put the number of lines of LongPage(gCompositeListing,x) into test¬    if test = 0 then put true into done¬    else¬      put the number of lines of LongPage(gCompositeListing,x-1) into temp¬      put temp + (line (x-1) of gIssuesListStartIndex) into lowerBound¬      put lowerBound into line x of gIssuesListStartIndex¬    end if¬  end repeat¬  ¬  -- Figure out how the selection is broken up between pages¬  if (the number of lines of gIssuesListStartIndex = 1) or (the last item of gIssueSelection <= line 2 of gIssuesListStartIndex) then¬    put gIssueSelection into gMultiIssuesListSelections¬    put 1 into gIssuesListPage¬  else¬    put xlate(gIssueSelection,comma,return) into theSelectList¬    repeat with x = the number of lines of gIssuesListStartIndex down to 2¬      set cursor to busy¬      put line x of gIssuesListStartIndex into thisStartNum¬      put selectLines (theSelectList,1,"N",">" & thisStartNum) into thisPageSelections¬      put selectLines(theSelectList,1,"N","≤" & thisStartNum) into theSelectList¬      if word 1 of thisPageSelections <> empty then¬        put xlate(array2Cnst(thisPageSelections,"-",thisStartNum),return,comma) into temp¬        if the last char of temp = coma then delete the last char of temp¬        put temp into line x of gMultiIssuesListSelections¬        put x into gIssuesListPage¬      end if¬    end repeat¬    ¬    if word 1 of theSelectList<> empty then¬      put 1 into gIssuesListPage¬      put xlate(theSelectList,return,comma) into temp¬      if the last char of temp = comma then¬        delete the last char of temp¬        put temp into line 1 of gMultiIssuesListSelections¬      end if¬    end if¬  end if¬  ¬  put LongPage(gCompositeListing, gIssuesListPage) into issuesList¬  wsSet "Select Issues","comicList","Text", issuesList¬  put true into nextIsDisabled¬  if LongPage(gCompositeListing,gIssuesListPage + 1) <> empty then put false into nextIsDisabled¬  put (the number of lines of gIssuesListStartIndex > 1) into arrowsAreVisible¬  ¬  wsSet "Select Issues","0","Properties", "Prev_Visible:" & arrowsAreVisible & return & "Next_Visible:" & arrowsAreVisible & return & "PageLabel_Visible:" & arrowsAreVisible & return & "PageLabel_Text:" & gIssuesListPage & return & "ComicList_Selection:" & line gIssuesListPage of gMultiIssuesListSelections & return & "Prev_Disabled:" & (gIssuesListPage = 1) & return & "Next_Disabled:" & nextIsDisabled & return & "OK_Disabled:" & (line gIssuesListPage of gMultiIssuesListSelections = empty) & return¬  ¬  wsSet wdID,"0","Name", selectedTitles¬  ¬  ¬else if objValue="Close" then ¬  -- save the window position¬  put "21" & tab & wdName & tab & wsGet(wdID,"0","Rect") into line 21 of gWindowPositions¬  ¬  get wsGet(wdID,"ComicList","Selection")¬  put it into issueSelection¬  disable menuItem "Select All" of menu "Edit"¬end if¬¬--end windowEvent¬
  9.  
  10. ItemType: PUSH
  11. Rect: 424,271,496,291
  12. Disabled: TRUE
  13. Name: OK
  14. DefaultItem: TRUE
  15. AutoClose: TRUE
  16. Balloon: Click here to add the selected issues to the list of issues to be printed.
  17.  
  18. ItemType: PUSH
  19. Rect: 331,271,411,291
  20. Name: Cancel
  21. CancelItem: TRUE
  22. AutoClose: TRUE
  23. Balloon: Click here to exit without adding the selected issues to the list of issues to be printed.
  24.  
  25. ItemType: TEXT
  26. Rect: 12,247,242,263
  27. TextSize: 12
  28. WhiteColor: -8739,-8739,-8739
  29. Text: Please choose one or more issues:
  30.  
  31. ItemType: LIST
  32. Rect: 10,19,502,243
  33. TextFont: Monaco
  34. TextSize: 9
  35. AutoSize: FALSE
  36. GrowItem: TRUE
  37. Name: ComicList
  38. DoubleClickItem: 1
  39. KeyScroll: TRUE
  40. Text: 
  41. Balloon: This is the list of the issues for this title. Click on one or more of these, then click the OK button to add them to the list of titles to be printed.
  42. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬global gMultiIssuesListSelections, gIssuesListPage¬put wsGet(wdID,"ComicList","Selection") into temp¬put temp into line gIssuesListPage of gMultiIssuesListSelections¬¬put ((word 1 of gMultiIssuesListSelections) = empty) into noneSelected¬wsSet wdID,"0","Properties",  "OK_Disabled:" & noneSelected & return¬--end mouseUp
  43.  
  44. ItemType: TEXT
  45. Rect: 15,2,57,14
  46. TextFont: Geneva
  47. TextSize: 9
  48. WhiteColor: -8739,-8739,-8739
  49. TextStyle: Bold
  50. Text: Issue
  51.  
  52. ItemType: TEXT
  53. Rect: 67,2,84,14
  54. TextFont: Geneva
  55. TextSize: 9
  56. Name: Condition
  57. WhiteColor: -8739,-8739,-8739
  58. TextStyle: Bold
  59. Text: Cd
  60.  
  61. ItemType: TEXT
  62. Rect: 154,2,175,14
  63. TextFont: Geneva
  64. TextSize: 9
  65. AutoSize: FALSE
  66. WhiteColor: -8739,-8739,-8739
  67. TextStyle: Bold
  68. Text: Qty
  69.  
  70. ItemType: TEXT
  71. Rect: 122,2,155,14
  72. TextFont: Geneva
  73. TextSize: 9
  74. WhiteColor: -8739,-8739,-8739
  75. TextStyle: Bold
  76. Text: Price
  77.  
  78. ItemType: TEXT
  79. Rect: 177,2,211,14
  80. TextFont: Geneva
  81. TextSize: 9
  82. WhiteColor: -8739,-8739,-8739
  83. TextStyle: Bold
  84. Text: Notes
  85.  
  86. ItemType: PICT
  87. Rect: 379,0,396,17
  88. Visible: FALSE
  89. Disabled: TRUE
  90. Name: Next
  91. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬global gIssuesListPage, gMultiIssuesListSelections, gCompositeListing¬¬set cursor to watch¬put wsGet(wdID,"comicList","Selection") into temp¬if temp = 0 then put empty into temp¬put temp into line gIssuesListPage of gMultiIssuesListSelections¬¬add 1 to gIssuesListPage¬WsSet wdID, "comicList","text", LongPage(gCompositeListing, gIssuesListPage)¬put (LongPage(gCompositeListing, gIssuesListPage + 1) = empty) into nextisDisabled¬¬wsSet wdID,"0","Properties", "ComicList_Selection:" & line gIssuesListPage of gMultiIssuesListSelections & return & "Prev_Disabled:False" & return & "Next_Disabled:" & nextIsDisabled & return & "PageLabel_Text:" & gIssuesListPage¬--end mouseUp¬
  92.  
  93. ItemType: PICT
  94. Rect: 343,0,360,17
  95. Visible: FALSE
  96. Disabled: TRUE
  97. Name: Prev
  98. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬global gIssuesListPage, gMultiIssuesListSelections, gIssuesListPage¬¬set cursor to watch¬put wsGet(wdID,"comicList","Selection") into temp¬if temp = 0 then put empty into temp¬put temp into line gIssuesListPage of gMultiIssuesListSelections¬¬subtract 1 from gIssuesListPage¬wsSet wdID,"comicList","text", LongPage(gCompositeListing, gIssuesListPage)¬put false into nextisDisabled¬¬wsSet wdID,"0","properties", "ComicList_Selection:" & line gIssuesListPage of gMultiIssuesListSelections & return & "Prev_Disabled:" & (gIssuesListPage = 1) & return & "Next_Disabled:" & nextIsDisabled & return & "PageLabel_Text:" & gIssuesListPage¬--end mouseUp
  99.  
  100. ItemType: TEXT
  101. Rect: 366,2,376,14
  102. TextFont: Geneva
  103. TextSize: 9
  104. Visible: FALSE
  105. Name: PageLabel
  106. WhiteColor: -4370,-4370,-4370
  107. Text: 1